# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test10
# Description:  例5.10
# Author:       ASUS
# Date:         2019/3/3
#-------------------------------------------------------------------------------


s = input("请输入一个大字符串：")
while True:
    subString = input("请输入一个子字符串：")
    if subString == "end":
        break
    startStr = input("请输入开始索引：")
    endStr = input("请输入结束索引：")
    start = 0
    end = len(s)
    if startStr != "":
        start = int(startStr)
    if endStr != "":
        end = int(endStr)
    print("'{}'在'{}'的出现位置是{}：".format(subString,s,s.find(subString,start,end)))




